﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

using SPOooON.TileWorld.Model;

namespace SPOooON.TileWorld.Factory
{
    class BaseWorldFactory : IWorldFactory
    {
        private static IWorldFactory instance;
        private BaseWorldFactory() { }

        public static IWorldFactory Instance 
        {
            public get 
            {
                if (instance == null) instance = new BaseWorldFactory();
                return instance; 
            }
        }

        public World IWorldFactory.GetWorld()
        {
            World w = new World();
            w.AddLast(new Layer());

            return w;
        }
    }
}
